<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="../vue.js"></script>
</head>
<body>
<div id="app1">
  <button @click="show = !show">
    Toggle
  </button>
  <transition name="fade">
    <p v-if="show">Hello</p>
  </transition>
</div>
</body>
</html>
<script>
var app=new Vue({
  el:'#app1',
  data:{
    show:true
  }
})
</script>

<style>
  .fade-enter-active, .fade-leave-active{
    transition: opacity .5s;
  }
  .fade-enter, .fade-leave-to{
    opacity: 0;
  }
</style>